/*
 Navicat Premium Data Transfer

 Source Server         : demo
 Source Server Type    : MySQL
 Source Server Version : 80031
 Source Host           : localhost:3306
 Source Schema         : 2102A-week203

 Target Server Type    : MySQL
 Target Server Version : 80031
 File Encoding         : 65001

 Date: 30/06/2023 09:56:57
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for order_classification
-- ----------------------------
DROP TABLE IF EXISTS `order_classification`;
CREATE TABLE `order_classification` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of order_classification
-- ----------------------------
BEGIN;
INSERT INTO `order_classification` (`id`, `name`) VALUES (1, '分类1');
INSERT INTO `order_classification` (`id`, `name`) VALUES (2, '分类2');
COMMIT;

-- ----------------------------
-- Table structure for order_info
-- ----------------------------
DROP TABLE IF EXISTS `order_info`;
CREATE TABLE `order_info` (
  `id` int NOT NULL AUTO_INCREMENT,
  `order_num` varchar(255) DEFAULT NULL,
  `submit_time` datetime DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `receive_name` varchar(255) DEFAULT NULL,
  `price` decimal(10,2) DEFAULT NULL,
  `pay_type` varchar(255) DEFAULT NULL,
  `source_id` int DEFAULT NULL,
  `classification_id` int DEFAULT NULL,
  `status` int DEFAULT NULL COMMENT '0 未支付 1已支付 2 未完成 3 已完成',
  `receive_phone` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_order_num` (`order_num`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of order_info
-- ----------------------------
BEGIN;
INSERT INTO `order_info` (`id`, `order_num`, `submit_time`, `user_id`, `receive_name`, `price`, `pay_type`, `source_id`, `classification_id`, `status`, `receive_phone`) VALUES (1, '34234的风格百搭复古的', '2023-03-31 16:48:17', 1, 'tom', 1.00, '未支付', 1, 1, 1, '17611221735');
INSERT INTO `order_info` (`id`, `order_num`, `submit_time`, `user_id`, `receive_name`, `price`, `pay_type`, `source_id`, `classification_id`, `status`, `receive_phone`) VALUES (2, '79c15bc9-1924-4124-8f46-c541b619af9e', '2023-03-31 00:00:00', 1, 'tom', 20.00, '支付宝', 1, 1, 0, '18605676236');
INSERT INTO `order_info` (`id`, `order_num`, `submit_time`, `user_id`, `receive_name`, `price`, `pay_type`, `source_id`, `classification_id`, `status`, `receive_phone`) VALUES (3, 'a1ebd999-d6dc-4e80-81fb-2bee5ac3c7b4', NULL, 1, 'jerry', NULL, 'WeChat', 1, NULL, 0, '18605676236');
INSERT INTO `order_info` (`id`, `order_num`, `submit_time`, `user_id`, `receive_name`, `price`, `pay_type`, `source_id`, `classification_id`, `status`, `receive_phone`) VALUES (4, '8247c786-5e26-4bfd-839b-e479816fcf36', NULL, 1, 'jerry', NULL, 'WeChat', 1, NULL, 0, '17611221735');
INSERT INTO `order_info` (`id`, `order_num`, `submit_time`, `user_id`, `receive_name`, `price`, `pay_type`, `source_id`, `classification_id`, `status`, `receive_phone`) VALUES (5, '6087efb4-0230-492f-aded-7acbac632bcc', NULL, 1, NULL, NULL, 'WeChat', 1, NULL, 0, NULL);
INSERT INTO `order_info` (`id`, `order_num`, `submit_time`, `user_id`, `receive_name`, `price`, `pay_type`, `source_id`, `classification_id`, `status`, `receive_phone`) VALUES (6, 'bae2f463-4fdf-47ad-b517-0eee3c7a1c17', NULL, 1, NULL, NULL, 'wechat', 1, NULL, 0, NULL);
INSERT INTO `order_info` (`id`, `order_num`, `submit_time`, `user_id`, `receive_name`, `price`, `pay_type`, `source_id`, `classification_id`, `status`, `receive_phone`) VALUES (7, '6f3d58b8-8885-4e91-bf98-1de0fd4ae8aa', NULL, 1, NULL, 200.00, 'app', 1, NULL, 0, NULL);
COMMIT;

-- ----------------------------
-- Table structure for order_source
-- ----------------------------
DROP TABLE IF EXISTS `order_source`;
CREATE TABLE `order_source` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of order_source
-- ----------------------------
BEGIN;
INSERT INTO `order_source` (`id`, `name`) VALUES (1, 'app订单');
INSERT INTO `order_source` (`id`, `name`) VALUES (2, 'pc订单');
COMMIT;

-- ----------------------------
-- Table structure for order_user
-- ----------------------------
DROP TABLE IF EXISTS `order_user`;
CREATE TABLE `order_user` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of order_user
-- ----------------------------
BEGIN;
INSERT INTO `order_user` (`id`, `name`) VALUES (1, '张三');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
